import request from '@/utils/request'

const urlStr = ''

// 作者列表
export function authorInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/authorInfo/qryList`,
    method: 'get',
    params
  })
}
// 作者删除
export function authorInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/authorInfo/del`,
    method: 'delete',
    params
  })
}
// 作者新增
export function authorInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/authorInfo/add`,
    method: 'post',
    data
  })
}
// 作者新增
export function authorInfoUpd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/authorInfo/update`,
    method: 'put',
    data
  })
}
// 素材列表
export function sourceInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/qryList`,
    method: 'get',
    params
  })
}
// 素材新增
export function sourceInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/add`,
    method: 'post',
    data
  })
}
// 素材删除
export function sourceInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/del`,
    method: 'delete',
    params
  })
}
// 素材修改
export function sourceInfoUpd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/update`,
    method: 'put',
    data
  })
}
// 素材详情
export function sourceInfoDetail(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/${data.id}`,
    method: 'get'
  })
}
// 素材分类列表
export function sourceClassInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceClassInfo/qryList`,
    method: 'get',
    params
  })
}
// 素材分类修改
export function sourceClassInfoEdit(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceClassInfo/update`,
    method: 'put',
    data
  })
}
// 素材分类排序
export function sourceClassInfoSort(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceClassInfo/batchUpdate`,
    method: 'put',
    data
  })
}
// 素材分类新增
export function sourceClassInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceClassInfo/add`,
    method: 'post',
    data
  })
}
// 素材分类删除
export function sourceClassInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceClassInfo/del`,
    method: 'delete',
    params
  })
}
// 文章分页列表
export function articleInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/qryList`,
    method: 'get',
    params
  })
}
// 文章新增
export function articleInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/add`,
    method: 'post',
    data
  })
}
// 文章上架、下架
export function articleInfoPut(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/upOrDown`,
    method: 'post',
    data
  })
}
// 文章删除
export function articleInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/del`,
    method: 'delete',
    params
  })
}
// 文章修改
export function articleInfoUpd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/update`,
    method: 'put',
    data
  })
}
// 文章详情
export function articleInfoDetail(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/${data.id}`,
    method: 'get'
  })
}
// 文章详情  获取机构列表
export function servicerDeptList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/servicer/qryDeptList`,
    method: 'get',
    params
  })
}
// 文章分类新增
export function categoryInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/categoryInfo/add`,
    method: 'post',
    data
  })
}
// 文章分类修改
export function categoryInfoUpd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/categoryInfo/update`,
    method: 'put',
    data
  })
}
// 文章分类删除
export function categoryInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/categoryInfo/del`,
    method: 'DELETE',
    params
  })
}
// 文章分类列表
export function categoryInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/categoryInfo/qryTreeList`,
    method: 'get',
    params
  })
}
// 文章分类列表排序
export function categoryInfoSort(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/categoryInfo/batchUpdate`,
    method: 'put',
    data
  })
}
// 标签管理列表  无分页
export function labelInfoAllList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/qryListByArticleInfo`,
    method: 'get',
    params
  })
}
// 标签管理列表
export function labelInfoList(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/qryList`,
    method: 'get',
    params
  })
}
// 标签管理 排序
export function labelInfoSort(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/batchUpdate`,
    method: 'put',
    data
  })
}
// 标签管理 新增
export function labelInfoAdd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/add`,
    method: 'post',
    data
  })
}
// 标签管理 修改
export function labelInfoUpd(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/update`,
    method: 'put',
    data
  })
}
// 标签管理 删除
export function labelInfoDel(params) {
  return request({
    url: `${urlStr}/scrm-knowledge/labelInfo/del`,
    method: 'delete',
    params
  })
}
// oss签名请求
export function doGetOssSign(params) {
  return request({
    url: `${urlStr}/kd_admin/doGetOssSign`,
    method: 'get',
    params
  })
}
// 文章批量修改权限
export function categoryInfoBatAuth(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/articleInfo/batAuth`,
    method: 'put',
    data
  })
}
// 素材批量修改权限
export function sourceInfoBatAuth(data) {
  return request({
    url: `${urlStr}/scrm-knowledge/sourceInfo/batAuth`,
    method: 'put',
    data
  })
}
